Skip to content

typing: Fix typing error of test parametrizations#611

Merged
PierreQuinton merged 2 commits intomainfrom
fix-typing
Mar 6, 2026
Merged

typing: Fix typing error of test parametrizations#611
PierreQuinton merged 2 commits intomainfrom
fix-typing

Conversation

@ValerianRey
Copy link
Contributor

The type of parametrizations was inferred to be list[tuple[UPGrad | IMTLG | ... | TrimmedMean, ...]], and we thus couldn't append the other aggregators to it (NashMTL, CAGrad). This makes the type of parametrizations be list[tuple] so it now works. I couldn't really specify list[tuple[Aggregator, Tensor, Tensor]], because sometimes we also have to add a pytest mark in the tuple, so these really are tuples whose exact type can vary, and thus it's better to not type them very precisely.

@ValerianRey ValerianRey added the cc: typing Conventional commit type for improvements to typing. label Mar 6, 2026
@github-actions github-actions bot changed the title Fix typing error of test parametrizations typing: Fix typing error of test parametrizations Mar 6, 2026
@PierreQuinton PierreQuinton merged commit 2523462 into main Mar 6, 2026
18 checks passed
@PierreQuinton PierreQuinton deleted the fix-typing branch March 6, 2026 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cc: typing Conventional commit type for improvements to typing.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants